﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using XStudio.XCRF.Data.Business.Archieve;
using XStudio.XCRF.Data.Enums;
using XStudio.XCRF.Data.Entities.CureInfo;
using XStudio.XCRF.Data.Entities.TongueAndPulse;

namespace XStudio.XCRF.Data.Entities.CureInfo
{
    /// <summary>
    /// 治疗信息
    /// </summary>
    public partial class CureInfo : BaseEntity<CureInfo>, IArchieve
    {
        #region 属性
        /// <summary>
        /// 治疗时间
        /// </summary>
        [ArchieveField]
        [Required]
        [DataType(DataType.DateTime)]
        public DateTime Time { get; set; }
        /// <summary>
        /// CRF主记录ID
        /// </summary>
        [ForeignKey("CRF")]
        public Guid? CRFID { get; set; }
        /// <summary>
        /// CRF主记录
        /// </summary>
        public virtual CRF CRF { get; set; }
        /// <summary>
        /// 主诉
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(200)]
        public string Complaint { get; set; }

        /// <summary>
        /// 症状
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(400)]
        public string Symptom { get; set; }

        /// <summary>
        /// 体征
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(400)]
        public string VitalSign { get; set; }

        ///// <summary>
        ///// 舌象
        ///// </summary>
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[Obsolete]
        //public string Tongue { get; set; }
        ///// <summary>
        ///// 脉象
        ///// </summary>
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[Obsolete]
        //public string Pulse { get; set; }

        /// <summary>
        /// 中成药、中药注射液
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<Inject> Injects { get; set; }
        /// <summary>
        /// 化疗信息
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<CureChemo> Chemos { get; set; }
        /// <summary>
        /// 放疗信息
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<CureRadio> Radios { get; set; }
        /// <summary>
        /// 超声刀信息
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<CureSound> Sounds { get; set; }
        /// <summary>
        /// 伽马刀信息
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<CureGamma> Gammas { get; set; }
        /// <summary>
        /// 其他治疗信息
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<CureOtherCure> OtherCures { get; set; }
        /// <summary>
        /// 治疗信息
        /// </summary>
        [InverseProperty("CureInfo")]
        public virtual ICollection<CureOperation> Operations { get; set; }
        /// <summary>
        /// KPS评分
        /// </summary>
        [ArchieveField]
        public byte? KPS { get; set; }
        /// <summary>
        /// ECOG评分
        /// </summary>
        [ArchieveField]
        public byte? ECOG { get; set; }
        /// <summary>
        /// 生活质量评分
        /// </summary>
        [ArchieveField]
        public byte? QOL { get; set; }

        /// <summary>
        /// 沉脉类
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(DeepPulseClassTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte DeepPulseClass { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string DeepPulseClassOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<PulseDeep> PulseDeeps { get; set; }
        /// <summary>
        /// 实脉类
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(ExcessPulseClassTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte ExcessPulseClass { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string ExcessPulseClassOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<PulseExcess> PulseExcesses { get; set; }

        /// <summary>
        /// 虚脉类
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FeeblePulseClassTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte FeeblePulseClass { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string FeeblePulseClassOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<PulseFeeble> PulseFeebles { get; set; }

        /// <summary>
        /// 浮脉类
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FloatingPulseClassTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte FloatingPulseClass { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string FloatingPulseClassOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<PulseFloat> PulseFloats { get; set; }

        /// <summary>
        /// 数脉类
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(RapidPulseClassTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte RapidPulseClass { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string RapidPulseClassOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<PulseRapid> PulseRapids { get; set; }

        /// <summary>
        /// 迟脉类
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(SlowPulseClassTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte SlowPulseClass { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string SlowPulseClassOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<PulseSlow> PulseSlows { get; set; }

        /// <summary>
        /// 苔色
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FurColorTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte FurColor { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string FurColorOther { get; set; }


        [InverseProperty("CureInfoes")]
        public ICollection<TongueFurColor> TongueFurColors { get; set; }

        /// <summary>
        /// 苔质
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FurCharacterTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte FurCharacter { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string FurCharacterOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<TongueFurCharacter> TongueFurCharacters { get; set; }
        
        /// <summary>
        /// 舌色
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(TongueColorTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte TongueColor { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string TongueColorOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<TongueColor> TongueColors { get; set; }

        /// <summary>
        /// 舌形
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(TongueShapeTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte TongueShape { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string TongueShapeOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<TongueShape> TongueShapes { get; set; }

        /// <summary>
        /// 舌态
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(TongueStatusTypes))]
        //[ArchieveField]
        //[Column(TypeName = "varchar")]
        //[MaxLength(200)]
        public byte TongueStatus { get; set; }

        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string TongueStatusOther { get; set; }

        [InverseProperty("CureInfoes")]
        public ICollection<TongueStatus> TongueStatuses { get; set; }

        /// <summary>
        /// 主证
        /// </summary>
        [InverseProperty("CureInfoes")]
        public virtual ICollection<Disease> PrimarySyms { get; set; }

        /// <summary>
        /// 次证
        /// </summary>
        [InverseProperty("CureInfoes")]
        public virtual ICollection<Disease> SubSyms { get; set; }

        /// <summary>
        /// 用药
        /// </summary>
        [Column(TypeName = "varchar")]
        [MaxLength(400)]
        public string Herbs { get; set; }

        /// <summary>
        /// 不良反应
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(200)]
        public string Reaction { get; set; }

        /// <summary>
        /// 复发转移情况
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(TransTypes))]
        public byte Trans { get; set; }

        /// <summary>
        /// 建议
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(200)]
        public string Advice { get; set; }


        /// <summary>
        /// 大便次数
        /// </summary>
        [ArchieveField]
        public byte? dbt { get; set; }

        /// <summary>
        /// 便溏不调
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte btbt { get; set; }

        /// <summary>
        /// 完谷不化
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte wgbh { get; set; }

        /// <summary>
        /// 大便干结
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte dbgj { get; set; }

        /// <summary>
        /// 便质
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(BZTypes))]
        public byte bz { get; set; }

        /// <summary>
        /// 便下臭秽
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte bxcs { get; set; }

        /// <summary>
        /// 大便其它情况
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string dbms { get; set; }

        /// <summary>
        /// 肛门灼热
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte gmzr { get; set; }

        /// <summary>
        /// 肛门坠重
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte gmzz { get; set; }

        /// <summary>
        /// 排便不爽
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte pbbs { get; set; }

        /// <summary>
        /// 便感其它情况
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string bgms { get; set; }

        /// <summary>
        /// 尿色
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(NSTypes))]
        public byte ns { get; set; }

        /// <summary>
        /// 尿量
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(NLTypes))]
        public byte nl { get; set; }

        /// <summary>
        /// 神疲乏力
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte spfl { get; set; }

        /// <summary>
        /// 头晕
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte ty { get; set; }

        /// <summary>
        /// 头痛
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte tt { get; set; }

        /// <summary>
        /// 耳鸣
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(EMTypes))]
        public byte em { get; set; }

        /// <summary>
        /// 五心烦热
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte wxfr { get; set; }

        /// <summary>
        /// 肢体沉重
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte ztcz { get; set; }

        /// <summary>
        /// 腰痛
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FTJATypes))]
        public byte yt { get; set; }

        /// <summary>
        /// 腰痛性质
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YTXZTypes))]
        public byte ytxz { get; set; }

        /// <summary>
        /// 食欲
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(SYTypes))]
        public byte sy { get; set; }

        /// <summary>
        /// 恶心或有呕吐
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte exot { get; set; }

        /// <summary>
        /// 腹胀
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FZTypes))]
        public byte fz { get; set; }

        /// <summary>
        /// 腹痛
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FTTypes))]
        public byte ft { get; set; }

        /// <summary>
        /// 腹痛位置
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FTWZTypes))]
        public byte ftwz { get; set; }

        /// <summary>
        /// 腹痛拒按
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(FTJATypes))]
        public byte ftja { get; set; }

        /// <summary>
        /// 腹痛喜温
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte ftxw { get; set; }

        /// <summary>
        /// 腹痛便后痛减
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte fttj { get; set; }

        /// <summary>
        /// 面色
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(MSTypes))]
        public byte ms { get; set; }

        /// <summary>
        /// 口味
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(KWTypes))]
        public byte kw { get; set; }

        /// <summary>
        /// 恶寒怕冷
        /// </summary>
        [ArchieveField]
        [EnumDataType(typeof(YouWuTypes))]
        public byte ehpl { get; set; }
        #endregion 属性


    }
}
